import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/*
 * @author zzr
 * @date: 2025/05/07  11:38
 * @description: 阻塞队列的使用~
 *  BlockingQueue 是阻塞队列中总的接口 存在三个实现类：ArrayBlockingQueue LinkedBlockingQueue PriorityBlockingQueue
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> blockingQueue = new ArrayBlockingQueue<>(1000);
        blockingQueue.put("hello");
        String ret = blockingQueue.take();
        System.out.println(ret);
    }
}
